import Vue from 'vue'
// 直接将Vue组件作为Vue.extend的参数
import choiceOrgGroup from "./choiceOrgGroup";

const showChoiceOrgGroup = (config) => {
    let showData = config.showData || null;
    let replaceFields = config.replaceFields || null;
    let multiple = config.multiple || false;
    const choiceOrgGroupConstructor = Vue.extend(choiceOrgGroup);
    const instance = new choiceOrgGroupConstructor({
        el: document.createElement("div")
    });

    document.querySelector("body").appendChild(instance.$el);
    return instance.show(showData, replaceFields, multiple);
};

export default showChoiceOrgGroup;
